﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using MuaChungDAO;

namespace DoAnMuaChung
{
    public partial class NestedHeaderFooter : System.Web.UI.MasterPage
    {
        private LoaiDealHandler ctrler = new LoaiDealHandler();
        protected void Page_Load(object sender, EventArgs e)
        {   
            //repeater_CacLoaiDeal.DataSource = LoaiDealHandler.napTatCa();
            repeater_CacLoaiDeal.DataSource = ctrler.getDsLoaiDeal();
            repeater_CacLoaiDeal.DataBind();

            string loai = Request.QueryString["LoaiDealID"];
            switch (loai)
            {
                case "1":
                    ((HyperLink)repeater_CacLoaiDeal.Items[0].Controls[1]).CssClass = "active";

                    break;
                case "2":
                    ((HyperLink)repeater_CacLoaiDeal.Items[1].Controls[1]).CssClass = "active";
                    break;
            }

            // nếu xem deal theo loại mà các deal đó chỉ bao gồm các deal trong hôm nay thì bật cái này lên
            //((HyperLink)Master.FindControl("menuItem_GiaTotHomNay")).CssClass = "active";

            
        }
    }
}